<template>
    <div>
        <h3>{{name}}</h3>
        <button @click="homeClick">home: {{counter}}</button>
    </div>
</template>
<script>
import { inject } from 'vue';
export default {
    setup() {
        const name = inject("name");
        const counter = inject("counter")

        const homeClick = () => counter.value++;

        return {
            name,
            counter,
            homeClick
        }
    }
}
</script>
<style>
</style>
